import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }


// 新增设备类型
export function addData(data) {
    return request({
        url: getUrl('/admin/equipmentType/add'),
        method: 'post',
        data
    })
}

// 查询设备类型详情
export function getData(value) {
    return request({
        url: getUrl('/admin/equipmentType/' + value),
        method: 'get'
    })
}

// 修改设备类型
export function updateData(data) {
    return request({
        url: getUrl('/admin/equipmentType/update'),
        method: 'put',
        data
    })
}

// 删除设备类型
export function deleteData(cycleId) {
    return request({
        url: getUrl('/admin/equipmentType/' + cycleId),
        method: 'delete'
    })
}


// 查询设备类型列表-分页
export function getDataList(data) {
    return request({
        url: getUrl('/admin/equipmentType/list'),
        method: 'get',
        data
    })
}


export function getAllData(data) {
    return request({
        url: getUrl('/admin/equipmentType/getAllData'),
        method: 'get',
        data
    })
}

export function getEquipmentTypeData(data) {
    return request({
        url: getUrl('/admin/equipmentType/getEquipmentTypeData'),
        method: 'get',
        data
    })
}
